/*River Warren
 *October 10, 2011
 *
 *Castle.h
 *To be used by the game Dungeons and Princesses
 *Controller class for Room class
*/

#ifndef CASTLE_H_INCLUDED
#define CASTLE_H_INCLUDED

#include <vector>
#include <string.h>
#include "Room.h"

using std::vector;

class Castle
{
    public:
        Castle();//constructor for new game loads R0
        Castle(string);//constructor for saved game loads room designated by parameter
        virtual ~Castle();
        string getDesc();//get description of room

        //move within castle
        //must be contained within try catch block
        void move(int);
        bool unlockDoor(string);//unlock door with proper key Id else throws exception
        string getObjectID();//return object Id of current room
        void enterRoom(string);//loads new room
        bool hasDoor();//returns true if current room has a door to unlock
        string getKeyCode();//returns key code for opening door
        void saveRooms();//saves all rooms
    protected:
    private:
        int currentRoom;//number of current room of play
        void setCurrentRoom(string);//sets current room from string
        void loadRooms();//loads rooms into array
        vector <Room>rooms;//array of rooms that make up a castle
};

#endif // CASTLE_H_INCLUDED
